07. Quiz: Destructuring Arrays (1-3)
Directions:
Use array destructuring to pull out the three colors from the array of things
and store them into the variables one
, two
, and three
.
Your Code:
Start Quiz:
/*
* Programming Quiz: Destructuring Arrays (1-3)
*
* Use destructuring to initialize the variables `one`, `two`, and `three`
* with the colors from the `things` array.
*/
const things = ['red', 'basketball', 'paperclip', 'green', 'computer', 'earth', 'udacity', 'blue', 'dogs'];
const one = things;
const two = '';
const three = '';
const colors = `List of Colors
1. ${one}
2. ${two}
3. ${three}`;
console.log(colors);